package org.apache.commons.pool2.impl;

import java.util.Collection;
import java.util.Iterator;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;

/**
 * 类的描述
 *
 * @author ztkool
 * @version v
 */
class InterruptibleReentrantLock extends ReentrantLock {

    private static final long serialVersionUID = 1L;

    public InterruptibleReentrantLock(boolean fairness) {
        super(fairness);
    }

    public void interruptWaiters(Condition condition) {
        Collection<Thread> threads = this.getWaitingThreads(condition);
        Iterator var3 = threads.iterator();

        while (var3.hasNext()) {
            Thread thread = (Thread) var3.next();
            thread.interrupt();
        }

    }
}
